import request from '@/utils/request'
// 质量考核管理

// 奖励列表
export function listQuality(query) {
  return request({
    url: '/TQualityAssessment/TQualityAssessment/list',
    method: 'get',
    params: query
  })
}

// 获取编号
export function getNumber(query) {
  return request({
    url: '/TQualityAssessment/TQualityAssessment/inspectionNumber',
    method: 'get',
    params: query
  })
}

// 查询奖励详细
export function getQuality(id) {
  return request({
    url: '/TQualityAssessment/TQualityAssessment/' + id,
    method: 'get'
  })
}

// 新增奖励
export function addQuality(data) {
  return request({
    url: '/TQualityAssessment/TQualityAssessment',
    method: 'post',
    data: data
  })
}

// 修改奖励
export function updateQuality(data) {
  return request({
    url: '/TQualityAssessment/TQualityAssessment',
    method: 'put',
    data: data
  })
}

// 删除奖励
export function delQuality(id) {
  return request({
    url: '/TQualityAssessment/TQualityAssessment/' + id,
    method: 'delete'
  })
}

// 奖励提交
export function submitQuality(data) {
  return request({
    url: '/TQualityAssessment/TQualityAssessment/submit',
    method: 'post',
    data
  })
}

// 审批
export function qualityApprove(data) {
  return request({
    url: '/TQualityAssessment/TQualityAssessment/approve',
    method: 'post',
    data
  })
}
